<template>
  <div class="app-main-root">
    <div class="app-main md:pt-0">
      <router-view />
    </div>
    <Footer class="footer" />
    <n-affix :bottom="150" style="right: 10px; z-index: 9999">
      <div class="md:hidden w-12 h-12 bg-white rounded-full">
        <a href="https://work.weixin.qq.com/ca/cawcde41a11326d2bc" target="_blank">
          <img src="@/assets/icons/weixin.png" alt="" />
        </a>
        <div class="border hidden md:block"></div>
        <n-popover
          placement="left"
          trigger="hover"
          style="padding: 15px; width: 200px; font-size: 16px"
        >
          <template #trigger>
            <img
              class="hidden md:block"
              src="https://static.huicanzhan.cn/common/sponsor/kefu.png"
              alt=""
            />
          </template>
          <div>
            <div> 客服电话：</div>
            <div> 400-0808-005</div>
            <div> 010-64005400</div>
          </div>
        </n-popover>
      </div>

      <div class="hidden md:block bg-white affix-box">
        <a href="https://work.weixin.qq.com/ca/cawcde41a11326d2bc" target="_blank">
          <img src="https://static.huicanzhan.cn/common/sponsor/weixin.png" alt="" />
        </a>
        <div class="border"></div>
        <n-popover
          placement="left"
          trigger="hover"
          style="padding: 15px; width: 200px; font-size: 16px"
        >
          <template #trigger>
            <img src="https://static.huicanzhan.cn/common/sponsor/kefu.png" alt="" />
          </template>
          <div>
            <div> 客服电话：</div>
            <div> 400-0808-005</div>
            <div> 010-64005400</div>
          </div>
        </n-popover>
      </div>
    </n-affix>
  </div>
</template>

<script lang="ts" setup>
  import Footer from '@/components/Footer/index.vue';
</script>
<style lang="less" scoped>
  .app-main-root {
    min-height: 100vh;
    // padding-bottom: 104px;
    // position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  .app-main {
    padding-top: 60px;
    flex-grow: 1;
  }
  .footer {
    // position: absolute;
    // width: 100%;
    // bottom: 0;
  }
  .affix-box {
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0px 5px 15px 1px rgba(0, 0, 0, 0.08);
    img {
      width: 25px;
      height: auto;
      cursor: pointer;
    }
    .border {
      height: 1px;
      border-bottom: 4px dashed #ccc;
      border-top: 4px dashed #ccc;
      margin: 15px 0;
    }
  }
</style>
